

DECLARE @IDPACIENTE INT
SET @IDPACIENTE = 3104  --3102

SELECT * FROM [dbo].[HM_EVALUACIONPARADIAGNOSTICO] WHERE IDHISTORIACLINICA = @IDPACIENTE
SELECT * FROM HM_HISTORIACLINICA WHERE IDHISTORIACLINICA = @IDPACIENTE
SELECT * FROM [dbo].[HM_ESTABLECIMIENTOSALUD] WHERE IDESTABLECIMIENTOSALUD = @IDPACIENTE
SELECT * FROM [dbo].[HM_PACIENTE] WHERE IDPACIENTE = @IDPACIENTE
--update [dbo].[HM_PACIENTE] SET APELLIDOPATERNO='Paciente Prueba 49' WHERE IDPACIENTE = 3108


/*

DECLARE @IDPACIENTE INT
SET @IDPACIENTE = 3105

DELETE FROM [dbo].[HM_EVALUACIONPARADIAGNOSTICO] WHERE IDHISTORIACLINICA = @IDPACIENTE
DELETE FROM HM_HISTORIACLINICA WHERE IDHISTORIACLINICA = @IDPACIENTE
DELETE FROM [dbo].[HM_ESTABLECIMIENTOSALUD] WHERE IDESTABLECIMIENTOSALUD = @IDPACIENTE
DELETE FROM [dbo].[HM_PACIENTE] WHERE IDPACIENTE = @IDPACIENTE

*/